import axios from "../axios";

export default {
    getBUgList: (params) => {
        return axios({
            method: "get",
            url: "/api/bug/query",
            params,
            headers: {
                token: window.localStorage.getItem("token"),
              },
        })
    },
    
    addBug:(data) => {
        return axios({
            method: "post",
            url: "/api/bug/add",
            data,
            headers: {
                token: window.localStorage.getItem("token"),
              },
        })
    },
   
    getDeveloperNameList:(params) => {
        return axios({
            method: "get",
            url: "/api/bug/userlist",
            params,
            headers: {
                token: window.localStorage.getItem("token"),
              },
        })
    },



    update: (data) => {//更改BUG状态
        return axios({
          //注意post请求的参数问题
          method: "patch",
          url: "/api/bug/update",
          data,
          headers: {
            token: window.localStorage.getItem("token"),
          },
        });
      },


      remove: (data) => {//更改BUG状态
        return axios({
          //注意post请求的参数问题
          method: "delete",
          url: "/api/bug/remove",
          data,
          headers: {
            token: window.localStorage.getItem("token"),
          },
        });
      },
   
}